# https://leetcode-cn.com/problems/pascals-triangle/
from typing import List


class Solution:
    def generate(self, numRows: int) -> List[List[int]]:
        ans = [[1]]
        if numRows == 1:
            return ans
        for i in range(numRows - 1):
            for nums1, nums2 in zip([0]+ans[i], ans[i]+[0]):
                print(nums1, nums2, sep="\n")

s = Solution() 
print(s.generate(2))